//
//  GPWithdrawalController.m
//  GoldPig
//
//  Created by 虎爷 on 2020/1/3.
//  Copyright © 2020 虎爷. All rights reserved.
//

#import "GPWithdrawalController.h"
#import "GPWithdrawView.h"

#define headHeight 900 //706

@interface GPWithdrawalController ()
@property (strong, nonatomic) UIScrollView *bgScrollView;
@property (strong, nonatomic) GPWithdrawView *withdrawView;
@end

@implementation GPWithdrawalController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self bgScrollView];
    [self withdrawView];
}

#pragma mark - 懒加载 -
-(UIScrollView *)bgScrollView{
    if (!_bgScrollView) {
        _bgScrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, -KSafeAreaTopHeight, kScreenWidth, kScreenHeight-KSafeAreaBottonHeight+KSafeStateHeight+KSafeAreaTopHeight)];
        _bgScrollView.contentSize = CGSizeMake(0, kScreenWidth/375*900-KSafeAreaBottonHeight);

        UIImageView *bgView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenWidth/375*900)];
        bgView.image = [UIImage imageNamed:@"提现背景"];
        [_bgScrollView addSubview:bgView];
        [self.view addSubview:_bgScrollView];
    }
    return _bgScrollView;
}

-(GPWithdrawView*)withdrawView{
    if (!_withdrawView) {
        _withdrawView = [GPWithdrawView initGPWithdrawView];
        _withdrawView.frame = CGRectMake(0, 0, kScreenWidth, kScreenWidth/375*900);
        [_bgScrollView addSubview:_withdrawView];
        WEAKSELF
        _withdrawView.closeCilckBlock = ^{
            [weakSelf.navigationController popViewControllerAnimated:NO];
        };
    }
    return _withdrawView;
}





@end
